{{if $CurrentUser['id']}}
		<div class="ui-portlet">
			<ol class="breadcrumb">
			  <li><a href="/users/index"><i class="fa fa-home"></i>&nbsp;&nbsp;{{__('Personal Center')}}</a></li>
			  <li class="active">客户管理</li>
			</ol>
		</div>        
       <hr>
       <div class="mb10">
       		<a class="btn btn-primary" href="/customers/add">新增客户</a> &nbsp;
       		
       		<a class="btn btn-primary" href="{{$this->Html->url('/user_cates/mine?model=Customer')}}">客户分类管理</a>
       </div>
       <br/>
       
       <div class=" ui-portlet" id="Customer-mine-list">
		
       	{{$page_navi}}
	       <table class="table">
		<thead><tr><th>公司</th><th>电话</th><th>邮箱</th><th>最后联系时间</th><th>操作</th></tr></thead>
	       {{loop $datalist $k $item}}
	       <tr>
	       	<td><a href="/customers/view/{{$item['Customer']['id']}}">{{$item['Customer']['name']}}</a><br/><small>{{$item['Customer']['address']}}</small></td>
	       	<td>{{$item['Customer']['mobile_phone']}}<br/>{{$item['Customer']['telephone']}}</td>
	       	<td>{{$item['Customer']['email']}}</td>
	       	<td>{{$item['Customer']['lastconnect']}}</td>
	       	<td>{{$this->Html->link('<i data-toggle="tooltip" target="_blank" data-container="body" data-placement="top" title="'.__('Edit').'" class="fa fa-edit"></i>', array('controller'=>'customers','action' => 'edit', $item['Customer']['id']),array('class'=>'opr-edit','data-id'=>$item['Customer']['id'],'escape'=>false))}}
		       			<a tabindex="0"  role="button" data-trigger="focus" href="javascript:void(0)" data-url="{{$this->Html->url('/customers/delete/'.$item['Customer']['id'])}}" class="delete-pop" data-content="确定永久删除此素材？"><i title="{{__('Delete')}}" class="fa fa-remove"></i></a>
		       	
		    </td></tr>
	       	
	  		{{/loop}}
	  		</table>
    	{{$page_navi}}
    	
    	</div>
{{else}}
<div class="container">
 	<div class=" ui-portlet" id="Customer-mine-list">	您还没有登录，请<a href="/users/login" onclick="return checkLogin();">登录</a>后查看。</div>
</div>
{{/if}}
    	
